<!DOCTYPE html>
<html>
<head>
<title>一问一答</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="../../css/bootstrap.min.css">
<link rel="stylesheet" href="../../css/font-awesome.min.css">
<link rel="stylesheet" href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
<link rel="stylesheet" href="../../plugins/ztree/css/metroStyle/metroStyle.css">
<link rel="stylesheet" href="../../css/main.css">
<script src="../../libs/jquery.min.js"></script>
<script src="../../plugins/layer/layer.js"></script>
<script src="../../libs/bootstrap.min.js"></script>
<script src="../../libs/vue.min.js"></script>
<script src="../../plugins/jqgrid/grid.locale-cn.js"></script>
<script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
<script src="../../plugins/ztree/jquery.ztree.all.min.js"></script>
<script src="../../js/common.js"></script>
</head>
<body>
<div id="rapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			<!--<a v-if="hasPermission(':infoQa:save')" class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			<a v-if="hasPermission(':infoQa:update')" class="btn btn-warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			<a v-if="hasPermission(':infoQa:delete')" class="btn btn-danger" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>-->
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="q.keyword" @keyup.enter="query" placeholder="输入标题进行搜索" />
			</div>
			<a class="btn btn-default" @click="query"><i class="fa fa-search">&nbsp;查询</i></a>
			<a v-if="hasPermission('info:qa:save')" class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;添加</a>
		</div>
		<div class="grid-btn" style="text-align: right;">
			 <label class="radio-inline"><input type="radio" name="infoQaTypeRadio" value="1" @click="changeInfoQaType(0)">全部</label> 
			 <label class="radio-inline"><input type="radio" name="infoQaTypeRadio" value="1" @click="changeInfoQaType(1)">新生儿期 </label> 
			 <label class="radio-inline"><input type="radio" name="infoQaTypeRadio" value="2" @click="changeInfoQaType(2)">婴儿期 </label> 
			 <label class="radio-inline"><input type="radio" name="infoQaTypeRadio" value="3" @click="changeInfoQaType(3)">幼儿期 </label>
			 <label class="radio-inline"><input type="radio" name="infoQaTypeRadio" value="4" @click="changeInfoQaType(4)">学龄前期 </label>
		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>
    
    <div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
		
			<div class="form-group ">
				<div class="col-sm-2 control-label">选择分类</div>
                <select class="form-control" v-model="infoQa.infoQaType" style="width:67%">
                	<option value="1">新生儿期</option>
                	<option value="2">婴儿期 </option>
                	<option value="3">幼儿期</option>
                	<option value="4">学龄前期</option>
                </select>
            </div>
            <div class="form-group">
			   	<div class="col-sm-2 control-label">标题</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="infoQa.title" placeholder="标题"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">问题</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="infoQa.question" placeholder="问题"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">作者</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="infoQa.author" placeholder="作者"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">作者职称</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="infoQa.authorTitle" placeholder="作者职称"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">回答内容</div>
			   	<div class="col-sm-10">
			   		<textarea rows="3" class="form-control" id="answerDetailTextarea" v-model="infoQa.answerDetail" placeholder="回答内容"></textarea>
			    </div>
			</div>
            <div class="form-group">
				<div class="col-sm-2 control-label"></div> 
				<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
            
            
		
						<!-- 	<div class="form-group">
			   	<div class="col-sm-2 control-label">添加时间</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="infoQa.createTime" placeholder="添加时间"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">更新时间</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="infoQa.modifyTime" placeholder="更新时间"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">操作IP(保留0)</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="infoQa.operIp" placeholder="操作IP(保留0)"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">操作用户ID</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="infoQa.operUserId" placeholder="操作用户ID"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">删除标识</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="infoQa.delFlag" placeholder="删除标识"/>
			    </div>
			</div>
													<div class="form-group">
			   	<div class="col-sm-2 control-label">一问一答分类 : 1新生儿期 2婴儿期 3幼儿期 4学龄前期</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="infoQa.infoQaType" placeholder="一问一答分类 : 1新生儿期 2婴儿期 3幼儿期 4学龄前期"/>
			    </div>
			</div> 
									
									<div class="form-group">
			   	<div class="col-sm-2 control-label">状态类型 : 0未处_无效 1已处_有效</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="infoQa.stateType" placeholder="状态类型 : 0未处_无效 1已处_有效"/>
			    </div>
			</div>-->
		</form>
	</div>
</div>
<!--查看-->
<div id="answerDetailLayer" style="display: none;">
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label" ></div>
                <div  id="answerDetailDiv" style="padding: 20px;"></div>
            </div>
        </form>
    </div>
<script src="../../js/modules/info/infoQa.js?v=0.2"></script>
</body>
</html>